package com.good.jzhouse.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MyPicConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        String property = System.getProperty("user.dir");
        registry.addResourceHandler("/static/images/userimg/**").addResourceLocations("file:"+property+"\\jzhouse\\src\\main\\resources\\static\\images\\userimg\\");
        registry.addResourceHandler("/static/images/houseimg/**").addResourceLocations("file:"+property+"\\jzhouse\\src\\main\\resources\\static\\images\\houseimg\\");
    }
}
